package com.catering.project.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.catering.common.annotation.Excel;
import com.catering.common.core.domain.BaseEntity;

@Data
@AllArgsConstructor
@NoArgsConstructor
/**
 * 购物车对象 cart
 * 
 * @author ruoyi
 * @date 2024-10-18
 */
public class Cart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private List<Dish> dishList;


    /** 购物车id */
    @Excel(name = "购物车id")
    private Long cartId;

    /** 桌id */
    @Excel(name = "桌id")
    private Long tableId;

    /** 菜id */
    @Excel(name = "菜id")
    private Long dishId;

    /** 菜名 */
    @Excel(name = "菜名")
    private String dishName;

    /** 价格 */
    @Excel(name = "价格")
    private BigDecimal price;

    /** 数量 */
    @Excel(name = "数量")
    private Long quantity;

    /** 添加时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    public void setCartId(Long cartId) 
    {
        this.cartId = cartId;
    }

    public Long getCartId() 
    {
        return cartId;
    }
    public void setTableId(Long tableId) 
    {
        this.tableId = tableId;
    }

    public Long getTableId() 
    {
        return tableId;
    }
    public void setDishId(Long dishId) 
    {
        this.dishId = dishId;
    }

    public Long getDishId() 
    {
        return dishId;
    }
    public void setDishName(String dishName) 
    {
        this.dishName = dishName;
    }

    public String getDishName() 
    {
        return dishName;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }
    public void setAddTime(Date addTime) 
    {
        this.addTime = addTime;
    }

    public Date getAddTime() 
    {
        return addTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cartId", getCartId())
            .append("tableId", getTableId())
            .append("dishId", getDishId())
            .append("dishName", getDishName())
            .append("price", getPrice())
            .append("quantity", getQuantity())
            .append("addTime", getAddTime())
            .toString();
    }
}
